package cn.iocoder.an.module.business.dal.mysql.audittype;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.audittype.AuditTypeDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.audittype.vo.*;

/**
 * 审核类型配置 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface AuditTypeMapper extends BaseMapperX<AuditTypeDO> {

    default PageResult<AuditTypeDO> selectPage(AuditTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AuditTypeDO>()
                .likeIfPresent(AuditTypeDO::getName, reqVO.getName())
                .eqIfPresent(AuditTypeDO::getStatus, reqVO.getStatus())
                .eqIfPresent(AuditTypeDO::getDescription, reqVO.getDescription())
                .betweenIfPresent(AuditTypeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AuditTypeDO::getId));
    }

}